﻿// Decompiled with JetBrains decompiler
// Type: SuperMiner.AutoMinerConfig_AddVisualizer
// Assembly: MG_SuperMiner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 4DA81FE3-ADC7-45B4-A911-3493B5D525DE
// Assembly location: E:\docs\Klei\OxygenNotIncluded\mods\Steam\2558070245\MG_SuperMiner.dll

using HarmonyLib;
using UnityEngine;

namespace SuperMiner
{
  [HarmonyPatch(typeof (AutoMinerConfig))]
  [HarmonyPatch("AddVisualizer")]
  public static class AutoMinerConfig_AddVisualizer
  {
    private static void Postfix(GameObject prefab, bool movable)
    {
      StationaryChoreRangeVisualizer choreRangeVisualizer = prefab.AddOrGet<StationaryChoreRangeVisualizer>();
      choreRangeVisualizer.width = AdvancedRoboMinerRange.width;
      choreRangeVisualizer.height = AdvancedRoboMinerRange.height;
      choreRangeVisualizer.x = AdvancedRoboMinerRange.xOffset;
      choreRangeVisualizer.y = AdvancedRoboMinerRange.yOffset;
      choreRangeVisualizer.vision_offset = AdvancedRoboMinerRange.VisionOffset;
    }
  }
}
